<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #main {
        width: 500px;
        height: 500px;
      }
    </style>
  </head>
  <body>
    <div id="main"></div>
    <script src="./lib/echarts.min.js"></script>
    <script>
      var myChart = echarts.init(document.getElementById('main'))

     const option = {
        title: {
          text: '谢晓波',
          subtext: '第三组',
        },
        xAxis: {
          type: 'category',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
          axisLine: {
            lineStyle: {
              type: 'dashed',
            },
          },
        },
        yAxis: {
          type: 'value',
          splitLine: {
            lineStyle: {
              type: 'dashed',
            },
          },
        },

        color: [
          {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [
              {
                offset: 0,
                color: '#5aabff',
              },
              {
                offset: 1,
                color: '#f7df1e',
              },
            ],
            global: false,
          },
          {
            type: 'radial',
            x: 0.5,
            y: 0.5,
            r: 0.5,
            colorStops: [
              {
                offset: 0,
                color: 'red', // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'blue', // 100% 处的颜色
              },
            ],
            global: false, // 缺省为 false
          },
        ],
        series: [
          {
            data: [300, 200, 140, 80, 70, 110, 150],
            type: 'bar',
          },
          {
            data: [120, 210, 260, 100, 70, 170, 130],
            type: 'bar',
          },
        ],
      }
      myChart.setOption(option)

    </script>
  </body>
</html>
